package com.ruoyi.net.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.uuid.IdUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.net.mapper.ElementQosActionImageMapper;
import com.ruoyi.net.domain.ElementQosActionImage;
import com.ruoyi.net.service.IElementQosActionImageService;

/**
 * 网元-QOS配置-流行为-镜像配置Service业务层处理
 * 
 * @author net
 * @date 2024-11-17
 */
@Service
public class ElementQosActionImageServiceImpl implements IElementQosActionImageService 
{
    @Autowired
    private ElementQosActionImageMapper elementQosActionImageMapper;

    /**
     * 查询网元-QOS配置-流行为-镜像配置
     * 
     * @param id 网元-QOS配置-流行为-镜像配置主键
     * @return 网元-QOS配置-流行为-镜像配置
     */
    @Override
    public ElementQosActionImage selectElementQosActionImageById(String id)
    {
        return elementQosActionImageMapper.selectElementQosActionImageById(id);
    }

    /**
     * 查询网元-QOS配置-流行为-镜像配置列表
     * 
     * @param elementQosActionImage 网元-QOS配置-流行为-镜像配置
     * @return 网元-QOS配置-流行为-镜像配置
     */
    @Override
    public List<ElementQosActionImage> selectElementQosActionImageList(ElementQosActionImage elementQosActionImage)
    {
        return elementQosActionImageMapper.selectElementQosActionImageList(elementQosActionImage);
    }

    /**
     * 新增网元-QOS配置-流行为-镜像配置
     * 
     * @param elementQosActionImage 网元-QOS配置-流行为-镜像配置
     * @return 结果
     */
    @Override
    public int insertElementQosActionImage(ElementQosActionImage elementQosActionImage)
    {
        String uuid = IdUtils.simpleUUID();
        if (StringUtils.isEmpty(elementQosActionImage.getId())) {
            elementQosActionImage.setId(uuid);
        }
        elementQosActionImage.setCreateBy(SecurityUtils.getUsername());
        elementQosActionImage.setCreateTime(DateUtils.getNowDate());
        elementQosActionImage.setUpdateBy(SecurityUtils.getUsername());
        elementQosActionImage.setUpdateTime(DateUtils.getNowDate());
        return elementQosActionImageMapper.insertElementQosActionImage(elementQosActionImage);
    }

    /**
     * 修改网元-QOS配置-流行为-镜像配置
     * 
     * @param elementQosActionImage 网元-QOS配置-流行为-镜像配置
     * @return 结果
     */
    @Override
    public int updateElementQosActionImage(ElementQosActionImage elementQosActionImage)
    {
        elementQosActionImage.setUpdateBy(SecurityUtils.getUsername());
        elementQosActionImage.setUpdateTime(DateUtils.getNowDate());
        return elementQosActionImageMapper.updateElementQosActionImage(elementQosActionImage);
    }

    /**
     * 批量删除网元-QOS配置-流行为-镜像配置
     * 
     * @param ids 需要删除的网元-QOS配置-流行为-镜像配置主键
     * @return 结果
     */
    @Override
    public int deleteElementQosActionImageByIds(String[] ids)
    {
        return elementQosActionImageMapper.deleteElementQosActionImageByIds(ids);
    }

    /**
     * 删除网元-QOS配置-流行为-镜像配置信息
     * 
     * @param id 网元-QOS配置-流行为-镜像配置主键
     * @return 结果
     */
    @Override
    public int deleteElementQosActionImageById(String id)
    {
        return elementQosActionImageMapper.deleteElementQosActionImageById(id);
    }
}
